// tooltip.js

import Vue from 'vue'
import Tooltip from 'v-tooltip'

Vue.use(Tooltip)

const TooltipDirective = {
  bind (el, binding) {
    el.setAttribute('data-tooltip', binding.value)
    el.classList.add('tooltip')
  },
  unbind (el) {
    el.removeAttribute('data-tooltip')
    el.classList.remove('tooltip')
  }
}

export default TooltipDirective
